import Vue from 'vue'
import VueRouter from 'vue-router'
import index from '../components/index/index.vue'
// import top from '../components/top/top.vue'
import writeBlog from '../components/writeBlog/writeBlog.vue'
import details from '../components/details/details.vue'
import login from '../components/login/login.vue'
import mine from '../components/mine/mine.vue'
import phone from '../components/phone/pbone.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/index',
    name:"首页",
    // redirect: '/index'
   component: index
  },
  {
    path: '/',
    redirect: '/index'
  },
  {
    path: '/details',
    name:"博客详情",
    component:details
  },
  {
    path: '/login',
    name:"登录",
    component:login
  },
  {
    path: '/writeBlog',
    name:"写博客",
    component:writeBlog
  },
  {
    path: '/mine',
    name:"我的简介",
    component:mine
  },
  {
    path: '/phone',
    name:"我的联系方式",
    component:phone
  }
];
const router =new VueRouter({
  routes:routes
})

export default router
